using System.Collections.Generic;
using QuanLiSinhVien_v01.BUS.Pattern;
using QuanLiSinhVien_v01.DAO;
using QuanLiSinhVien_v01.DTO;

namespace QuanLiSinhVien_v01.BUS.Data
{
    class BangDiemBus
    {
        static public List<Observer> Observers = new List<Observer>();

        public BangDiemDto Info { get; set; }
        public BangDiemDao Data { get; set; }
        public DiemDb DiemDb { get; set; }

        public BangDiemBus()
        {
            Info = new BangDiemDto();
            Data = new BangDiemDao();
        }

        public void Insert()
        {
            Data.BangDiem = Info;
            Data.Insert();
            foreach (var observer in Observers)
            {
                observer.DTO = Info;
                observer.Update();
            }
        }


    }
}
